<template>
    <div>
  <el-breadcrumb separator="/" replace=true>
  <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
  <el-breadcrumb-item >商品管理</el-breadcrumb-item>

</el-breadcrumb>
 <el-button plain @click="add">添加</el-button>
 <vList @edit='edit'/>
<v-dilog :isShow='isShow' :isAdd='isAdd' @cancel='cancel' ref="diaInfo"/>
    </div>
</template>

<script>

import vDilog from './cmmgdilog'
import vList from './cmmglist'
export default {
  // 菜单管理
  data () {
    return {
      isShow: false,
      isAdd: false
    }
  },
  components: {

    vDilog, vList

  },
  methods: {
    add () {
      this.isShow = true
    },
    cancel (e) {
      this.isShow = e
    },
    edit (id) {
      this.isShow = true
      this.isAdd = true
      this.$refs.diaInfo.lookup(id)
    }
  }
}
</script>

<style scoped>
.el-button{
  margin-top: 20px;
  /* border: 1px solid #b3d8ff;
  background-color: #ecf5ff;
  color: #409eff; */
}
.qiyong{
    padding: 7px 8px;

}

</style>
